<div id = "plist" class="list">
    <table>
      <thead>
      <tr>

        <g:sortableColumn property="id" title="Id" />

        <g:sortableColumn property="name" title="Name" />

        <g:sortableColumn property="description" title="Description" />

        <g:sortableColumn property="location" title="Location" />

        <g:sortableColumn property="requiredVolunteers" title="Required Volunteers" />

        <g:sortableColumn property="noOfVolunteerOpenPosition" title="No of open Volunteer Positions" />

        <th>Event</th>

      </tr>
      </thead>
      <tbody>
      <g:each in="${positionInstanceList}" status="i" var="positionInstance">
        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">



          <td><g:link action="show" id="${positionInstance.id}">${fieldValue(bean:positionInstance, field:'id')}</g:link></td>
          <td>${fieldValue(bean:positionInstance, field:'name')}</td>

          <td>${fieldValue(bean:positionInstance, field:'description')}</td>

          <td>${fieldValue(bean:positionInstance, field:'location')}</td>

          <td>${fieldValue(bean:positionInstance, field:'requiredVolunteers')}</td>

          <td>${fieldValue(bean:positionInstance, field:'noOfVolunteerOpenPosition')}</td>

          <td>${fieldValue(bean:positionInstance, field:'event')}</td>

          <g:javascript>

                new Ajax.PeriodicalUpdater('plist',
                            '<g:createLink action="list" id="${positionInstance.event.id}" />',
                        {frequency: 5, maxFrequency: 20, decay: 2});
           </g:javascript>

        </tr>

      </g:each>

      </tbody>

    </table>
  </div>
  